package com.smart.job.executor.client;

import com.smart.common.utils.PageUtils;
import com.smart.common.utils.R;
import com.smart.domain.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(name = "cardc-plat-service")
public interface PlatInfoClient {


	/**
	 * 查询全部加油站数据
	 */
	@RequestMapping(value = "/plat/stationInfo/listStation",method = RequestMethod.GET)
	List<StationInfoDO> listStation();

	//TODO 以下是平台表的跳转
	@RequestMapping(value = "/plat/platInfo/list",method = RequestMethod.GET)
	PageUtils list(@RequestParam Map<String, Object> params);
	@RequestMapping(value = "/plat/platInfo/batchRemove",method = RequestMethod.POST)
	R batchRemove(@RequestParam Integer[] platIds);

	@RequestMapping(value = "/plat/platInfo/save",method = RequestMethod.POST)
	R save(@RequestBody PlatInfoDO platInfo);

	@RequestMapping(value = "/plat/platInfo/changeStatus",method = RequestMethod.POST)
	R changeStatus(@RequestParam("id") Long id, @RequestParam("status") Integer status);

	@RequestMapping(value = "/plat/platInfo/remove",method = RequestMethod.POST)
	R remove(@RequestParam("platId") Integer platId);

	@RequestMapping(value = "/plat/platInfo/listPlatDict",method = RequestMethod.GET)
	List<PlatInfoDO> listPlatDict();

	@RequestMapping(value = "/plat/platInfo/listByIds",method = RequestMethod.GET)
	List<PlatInfoDO> listByIds(@RequestParam Integer[] platIds);

	@RequestMapping(value = "/plat/platInfo/get",method = RequestMethod.GET)
	R getPlat(@RequestParam Integer platId);

	//TODO 以下是商户表的跳转
	//获取列表
	@RequestMapping(value = "/plat/merchantInfo/list",method = RequestMethod.GET)
	PageUtils merchantInfoList(@RequestParam Map<String, Object> map);
	//保存
	@RequestMapping(value = "/plat/merchantInfo/save",method = RequestMethod.POST)
	R saveMerchantInfo(@RequestBody MerchantInfoDO merchantInfo);
	//下拉字典
	@RequestMapping(value = "/plat/merchantInfo/listMerchantDict",method = RequestMethod.POST)
	List<MerchantInfoDO> listMerchantDict(@RequestParam Integer platId);

	//修改
	@RequestMapping(value = "/plat/merchantInfo/update",method = RequestMethod.POST)
	R updateMerchantInfo(@RequestBody MerchantInfoDO merchantInfo);

	@RequestMapping(value = "/plat/merchantInfo/remove",method = RequestMethod.POST)
	R removeMerchant(@RequestParam Integer merchantId);

	@RequestMapping(value = "/plat/merchantInfo/batchRemove",method = RequestMethod.POST)
	R batchRemoveMerchant(@RequestParam Integer[] merchantIds);

	@RequestMapping(value = "/plat/merchantInfo/edit",method = RequestMethod.GET)
	MerchantInfoDO getMerchant(@RequestParam Integer merchantId);

	@RequestMapping(value = "/plat/merchantInfo/changeStatus",method = RequestMethod.POST)
	R changeStatusMerchant(@RequestParam Long id, @RequestParam Integer status);

	@RequestMapping(value = "/plat/merchantInfo/listByMerchantIds",method = RequestMethod.GET)
	List<MerchantInfoDO> listByMerchantIds(@RequestParam Integer[] merchantIds);

	@RequestMapping(value = "/plat/stationInfo/get",method = RequestMethod.GET)
	StationInfoDO getStation(@RequestParam Integer stationId);

	@RequestMapping(value = "/plat/shopInfo/getShopById",method = RequestMethod.GET)
	ShopInfoDO getShopById(@RequestParam Integer shopId);

	@RequestMapping(value = "/plat/shopInfo/getShopByIds",method = RequestMethod.GET)
	List<ShopInfoDO> getShopByIds(@RequestParam Integer[] shopId);

	@RequestMapping(value = "/plat/stationInfo/listByStationIds",method = RequestMethod.GET)
	List<StationInfoDO> listByStationIds(@RequestParam Integer[] stationIds);



	@RequestMapping(value = "/plat/stationInfo/listByMerchantIds",method = RequestMethod.GET)
	List<StationInfoDO> listStationByMerchantIds(@RequestParam Integer[] merchantIds);

	/*
  数据字典相关服务  开始
   */
	@RequestMapping(value = "/basedata/dict/type",method = RequestMethod.GET)
	R listType();

	@RequestMapping(value = "/basedata/dict/list",method = RequestMethod.GET)
	PageUtils listDic(@RequestParam Map<String, Object> map);

	@RequestMapping(value = "/basedata/dict/save",method = RequestMethod.POST)
	R save(@RequestBody DictDO dict);

	@RequestMapping(value = "/basedata/dict/update",method = RequestMethod.POST)
	R update(@RequestBody DictDO dict);

	@RequestMapping(value = "/basedata/dict/checkDuplicate",method = RequestMethod.GET)
	R checkDuplicate(@RequestBody DictDO dict, @RequestParam("flag") String flag);

	@RequestMapping(value = "/basedata/dict/get",method = RequestMethod.GET)
	R get(@RequestParam Long id);

	@RequestMapping(value = "/basedata/dict/remove",method = RequestMethod.POST)
	R remove(@RequestParam Long id);

	@RequestMapping(value = "/basedata/dict/batchRemove",method = RequestMethod.POST)
	R batchRemove(@RequestParam Long[] ids);

	@RequestMapping(value = "/basedata/dict/listByType",method = RequestMethod.GET)
	R listByType(@RequestParam Map<String, Object> map);

	@RequestMapping(value = "/basedata/dict/listdictbykeys",method = RequestMethod.GET)
	R listDicts(@RequestParam String[] keys);

	@RequestMapping(value = "/basedata/dict/baseAreaList",method = RequestMethod.GET)
	R getDicByType(@RequestParam Map<String, Object> map);

	/*
      区域信息  开始
    */
	@RequestMapping(value = "/basedata/baseArea/list",method = RequestMethod.GET)
	PageUtils baseAreaList(@RequestParam Map<String, Object> map);

	@RequestMapping(value = "/basedata/baseArea/get",method = RequestMethod.GET)
	R getAreaById(@RequestParam Integer id);

	@RequestMapping(value = "/basedata/baseArea/save",method = RequestMethod.POST)
	R saveArea(@RequestBody BaseAreaDO hyBaseArea);

	@RequestMapping(value = "/basedata/baseArea/update",method = RequestMethod.POST)
	R updateArea(@RequestBody BaseAreaDO hyBaseArea);

	@RequestMapping(value = "/basedata/baseArea/remove",method = RequestMethod.POST)
	R removeArea(@RequestParam Integer id);

	@RequestMapping(value = "/basedata/baseArea/batchRemove",method = RequestMethod.POST)
	R batchRemoveArea(@RequestParam Integer[] ids);

	@RequestMapping(value = "/basedata/baseArea/listProvince",method = RequestMethod.GET)
	R listProvince(@RequestParam Map<String, Object> map);

	@RequestMapping(value = "/basedata/baseArea/baseAreaList",method = RequestMethod.GET)
	R getAreaByType(@RequestParam Map<String, Object> map);

}